package com.wanglei.ssm.dao;

import com.wanglei.ssm.domain.SysLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 系统操作日志
 */
public interface SysLogDao {

    @Insert("insert into syslog(visitTime, username, ip, url, executionTime, method) values(#{visitTime}, #{username}, #{ip}, #{url}, #{executionTime}, #{method}) ")
    void save(SysLog sysLog) throws Exception;

    @Select("select * from syslog")
    List<SysLog> findAll() throws Exception;
}
